<?php

namespace Database\Factories;

use App\Models\LiveAnchor;
use App\Models\LiveRoom;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;

class LiveRoomFactory extends Factory
{
    /**
     * The name of the factory's corresponding model.
     *
     * @var string
     */
    protected $model = LiveRoom::class;

    /**
     * Define the model's default state.
     *
     * @return array
     */
    public function definition()
    {
        return [
            'room_id' => $this->faker->randomNumber(6,true),
            'anchor_id' => $this->faker->randomElement(LiveAnchor::pluck('id')),
            'name' => $this->faker->text(5),
            'cover_img' => 'http://placeimg.com/40/40/any',
            'share_img' => 'http://placeimg.com/40/40/any',
            'phone' => $this->faker->phoneNumber,
            'start_at' => $this->faker->dateTime,
            'phone' => $this->faker->phoneNumber,
            'end_at' => $this->faker->dateTime,
            'error_msg' => $this->faker->realText(10),
            'mark' => $this->faker->realText(15),
            'sort' => $this->faker->numberBetween(1, 10),
            'room_type' => $this->faker->randomElement(['pushFlow', 'mobilePhone']),
            'screen_type' => $this->faker->randomElement(['horizontalScreen', 'verticalScreen']),
            'live_status' => $this->faker->randomElement(['liveBroadcast', 'notStarted', 'hasEnded', 'noBroadcasting', 'suspend', 'abnormal', 'expired']),
            'status' => $this->faker->randomElement(['notApproved', 'wechatAudit', 'approved', 'auditFailed']),
            'is_openLike' => $this->faker->randomElement([0, 1]),
            'is_openShelf' => $this->faker->randomElement([0, 1]),
            'is_openComments' => $this->faker->randomElement([0, 1]),
            'is_show' => $this->faker->randomElement([0, 1]),
            'replay_status' => $this->faker->randomElement([0, 1]),
        ];
    }
}
